package com.i2works.smartluolong.manageapi.config;

import com.i2works.smartluolong.utils.config.FastjsonConfigurationUtils;
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * fastjson
 *
 * @author Liu Yutao <koal@vip.qq.com>
 * @date 2018/1/18 13:22
 */
@Configuration
public class FastjsonConfiguration {

    /**
     * 使用@Bean注入fastJsonHttpMessageConvert
     */
    @Bean("fastjson")
    public HttpMessageConverters fastJsonHttpMessageConverters() {
        return FastjsonConfigurationUtils.fastJsonHttpMessageConverters();
    }


//    @Bean
//    public StringHttpMessageConverter stringHttpMessageConverter() {
//        return FastjsonConfigurationUtils.stringHttpMessageConverter();
//    }

}
